home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsPIWindowWatcher.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  124 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is mozilla.org code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications, Inc.
  20.  * Portions created by the Initial Developer are Copyright (C) 2001
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. /* Private "control" methods on the Window Watcher. These are annoying
  40.    bookkeeping methods, not part of the public (embedding) interface.
  41. */
  42.  
  43. #include "nsISupports.idl"
  44.  
  45. interface nsIDOMWindow;
  46. interface nsISimpleEnumerator;
  47. interface nsIWebBrowserChrome;
  48. interface nsIDocShellTreeItem;
  49.  
  50. %{C++
  51. #include "jspubtd.h"
  52. %}
  53.  
  54. [ptr] native jsvalptr(jsval);
  55.  
  56. [uuid(3aaad312-e09d-4010-a013-78ef653dac99)]
  57.  
  58. interface nsPIWindowWatcher : nsISupports
  59. {
  60.   /** A window has been created. Add it to our list.
  61.       @param aWindow the window to add
  62.       @param aChrome the corresponding chrome window. The DOM window
  63.                      and chrome will be mapped together, and the corresponding
  64.                      chrome can be retrieved using the (not private)
  65.                      method getChromeForWindow. If null, any extant mapping
  66.                      will be cleared.
  67.   */
  68.   void addWindow(in nsIDOMWindow aWindow, in nsIWebBrowserChrome aChrome);
  69.  
  70.   /** A window has been closed. Remove it from our list.
  71.       @param aWindow the window to remove
  72.   */
  73.   void removeWindow(in nsIDOMWindow aWindow);
  74.  
  75.   /** Like the public interface's open(), but can deal with openDialog
  76.       style arguments.
  77.       @param aParent parent window, if any. Null if no parent.  If it is
  78.              impossible to get to an nsIWebBrowserChrome from aParent, this
  79.              method will effectively act as if aParent were null.
  80.       @param aURL url to which to open the new window. Must already be
  81.              escaped, if applicable. can be null.
  82.       @param aName window name from JS window.open. can be null.
  83.       @param aFeatures window features from JS window.open. can be null.
  84.       @param aDialog use dialog defaults (see nsIDOMWindowInternal::openDialog)
  85.       @param argc count of argv arguments
  86.       @param argv extra JS arguments, if any
  87.                   (see nsIDOMWindowInternal::openDialog)
  88.       @return the new window
  89.   */
  90.   nsIDOMWindow openWindowJS(in nsIDOMWindow aParent, in string aUrl,
  91.                in string aName, in string aFeatures, in boolean aDialog,
  92.                in PRUint32 argc, in jsvalptr argv);
  93.  
  94.   /**
  95.    * Find a named docshell tree item amongst all windows registered
  96.    * with the window watcher.  This may be a subframe in some window,
  97.    * for example.
  98.    *
  99.    * @param aName the name of the window.  Must not be null.
  100.    * @param aRequestor the tree item immediately making the request.
  101.    *        We should make sure to not recurse down into its findItemWithName
  102.    *        method.
  103.    * @param aOriginalRequestor the original treeitem that made the request.
  104.    *        Used for security checks.
  105.    * @return the tree item with aName as the name, or null if there
  106.    *         isn't one.  "Special" names, like _self, _top, etc, will be
  107.    *         treated specially only if aRequestor is null; in that case they
  108.    *         will be resolved relative to the first window the windowwatcher
  109.    *         knows about.
  110.    * @see findItemWithName methods on nsIDocShellTreeItem and
  111.    *      nsIDocShellTreeOwner
  112.    */
  113.   nsIDocShellTreeItem findItemWithName(in wstring aName,
  114.                                        in nsIDocShellTreeItem aRequestor,
  115.                                        in nsIDocShellTreeItem aOriginalRequestor);
  116. };
  117.  
  118. %{C++
  119. // {d535806e-afaf-47d1-8d89-783ad088c62a}
  120. #define NS_PWINDOWWATCHER_IID \
  121.  {0xd535806e, 0xafaf, 0x47d1, {0x8d, 0x89, 0x78, 0x3a, 0xd0, 0x88, 0xc6, 0x2a}}
  122. %}
  123.  
  124.